<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/page/common/taglibs.jsp" %>
<html>
<head>
    <title>Title</title>
</head>
<script type="text/javascript">
    function insert(){
        $.post(
            "${ctx}/exam/insert",
            $("#fm").serialize(),
            function(result){
                if(result.code !="200"){
                    layer.msg(result.msg,{icon:5});
                    return;
                }
                layer.msg(result.msg,{icon:6});
                parent.location.href="${ctx}/exam/toShow";
            }
        );
    }
</script>
<body>
<form id="fm">
    考试名称<input type="text" name="examName"/><br/>
    考生人数上限<input type="text" name="upper"/><br/>
    开始时间:
    <input readonly="readonly" type="text" name = "startTime" class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
    结束时间
    <input readonly="readonly" type="text" name = "endTime" class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
    <input type="button" value="添加" onclick="insert()"/>
</form>
</body>
</html>
